Skip to main content

mobilePixelDensity

Type

function

Summary

Returns the pixel density of the device screen (relative to a non-Retina display)

Syntax

mobilePixelDensity()

Description

Use the mobilePixelDensity function to find the scale of the device screen relative to a non-Retinal display on iOS and the display metrics density on Android.

The mobilePixelDensity function returns the scale of the device screen (relative to a non-Retinal display on iOS), this is 2 on a retina display and 1 otherwise. On Android this function returns the display metrics.

Examples

put mobilePixelDensity() into theScaleFactor

command: iphoneUseDeviceResolution

function: iphoneDeviceScale, iphoneDeviceResolution

Compatibility and Support

Introduced

LiveCode 5.5.3

OS

ios

android

Platforms

mobile

Thank you for your feedback!

Was this page helpful?